home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
I-Info Magazine
/
(c)i21.d64
/
clock teacher
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
7KB
|
336 lines
10 POKE53281,0:POKE53280,11
20 PRINT"[147]"TAB(8)"HICKORY, DICKORY, DOCK!
30 [153]""[163]14)"PLEASE WAIT
40 POKE56,48:CLR
50 POKE650,128:X=RND(-TI)
60 DIMN(12),LO(12,6),CH(12,6),NU(10,15),T1(12),T2(12)
70 S=54272:FORI=0TO24:POKES+I,0:NEXT:POKES+24,15
80 FORI=1TO30:READA$,A,B,C:NEXT
90 V=53248:POKE2040,13
100 FORI=0TO63:READA:POKE832+I,A:NEXT
110 POKEV+39,2:POKEV+37,1:POKEV+38,6
120 POKEV,150:POKEV+1,150
130 POKEV+23,1:POKEV+29,1
140 POKEV+28,1:POKEV+21,1
150 FORI=49152TO49152+81:READA:POKEI,A:NEXT
160 SYS49152
170 FORI=0TO143:READA:POKE12288+101*8+I,A:NEXT
180 FORI=1TO12:READN(I):NEXT
190 FORI=1TO12:FORJ=1TON(I):READLO(I,J):NEXT:NEXT
200 FORI=1TO12:FORJ=1TON(I):READCH(I,J):NEXT:NEXT
210 FORI=0TO9:FORJ=1TO15:READA$:IFA$="+"THENNU(I,J)=160
220 IFA$="-"THENNU(I,J)=32
230 NEXT:NEXT
240 FORI=1TO12:READT1(I),T2(I):NEXT
250 RESTORE:POKEV+21,0
260 PRINT"[147]CHOOSE ONE OF THE FOLLOWING:
270 [153][163]5)"1. TEST - HOURS
280 PRINTTAB(5)"2. TEST - HOURS AND HALF HOURS
290 [153][163]5)"3. TEST - 5 MIN. INTERVALS
300 PRINTTAB(5)"4. PRACTICE
310 [153][163]5)"5. END PROGRAM"
320 [161]KK$:[139]KK$[178]""[167]320
330 KK[178][197](KK$):[139]KK[179]1[176]KK[177]5[167]320
340 [139]KK[178]5[167][158]2048:[128]
350 [151]53272,([194](53272)[175]240)[170]12
360 RA[178]0:WA[178]0
370 [153]"LOAD"
380 [153][163]19)"12"
390 [153][163]14)"11 1"
400 [153]:[153][163]11)"10 2"
410 [153]:[153]:[153][163]11)"9 (null) 3"
420 [153]:[153]:[153][163]12)"8 4"
430 [153]:[153][163]15)"7 5"
440 [153][163]20)"6"
450 [153]"SYSF5=TANTANTANTAN
460 PRINT"F7=_[192][192][192][192][192]
470 [153]"RETURN=ANS.
480 PRINT"M=MENU
490 H[178]2:M[178]12:[141]950:[141]1060
500 [151]1844,160:[151]1844[170]S,2
510 [151]1924,160:[151]1924[170]S,2
520 [139]KK[178]4[167]2470
530 C[178]H:D[178]M:[153]"SET THE HANDS ON THE CLOCK:"
540 [141]1590:H[178]A:M[178]B:[141]1230:[141]1450:H[178]C:M[178]D
550 :
560 [151]198,0
570 K$[178]"":[161]K$:[139]K$[178]""[167]570
580 [139]K$[178]"READ"[167][141]1110
590 [139]K$[178]"LET"[167][141]1160
600 [139]K$[178][199](13)[167]640
610 [139]K$[178]"M"[167]260
620 [137]570
630 :
640 [139]H[179][177]A[176]M[179][177]B[167]770
650 [153]""[163]17)"CONTRIGHT!"
660 [141]2310
670 [129]I[178]1[164]10
680 [153]""[163]17)"RIGHT!"
690 [129]T[178]1[164]50:[130]
700 [153]""[163]17)"RIGHT!"
710 [129]T[178]1[164]50:[130]
720 [130]
730 [153]""[163]17)" "
740 WA[178]0:RA[178]RA[170]1:[139]RA[178]5[167]RA[178]0:[137]1700
750 [137]530
760 :
770 [153]""[163]17)"CLRWRONG!""
780 GOSUB2390:WA=WA+1
790 FORT=1TO1000:NEXT
800 PRINT""TAB(17)" "
810 IFWA<3THEN570
820 WA=0:PRINT"THE CORRECT TIME IS: "
830 GOSUB910:GOSUB1020
840 H=A:M=B:GOSUB950:GOSUB1060
850 FORT=1TO2000:NEXT
860 PRINT" "
870 GOTO530
880 :
890 :CHANGE MINUTE HAND
900 :
910 FORI=1TON(M)
920 POKELO(M,I),32
930 NEXT:RETURN
940 :
950 FORI=1TON(M)
960 POKELO(M,I),CH(M,I)
970 POKELO(M,I)+S,5
980 NEXT:GOSUB2250:RETURN
990 :
1000 :CHANGE HOUR HAND
1010 :
1020 FORI=1TON(H)-1
1030 POKELO(H,I),32
1040 NEXT:RETURN
1050 :
1060 FORI=1TON(H)-1
1070 POKELO(H,I),CH(H,I)
1080 POKELO(H,I)+S,7
1090 NEXT:GOSUB2250:RETURN
1100 :
1110 GOSUB910:GOSUB1020
1120 H=H+1:IFH=13THENH=1
1130 GOSUB1060:GOSUB950
1140 RETURN
1150 :
1160 GOSUB910:GOSUB1020
1170 M=M+1:IFM=13THENM=1
1180 GOSUB1060:GOSUB950
1190 RETURN
1200 :
1210 :CHANGE HOUR NUMBER
1220 :
1230 IFH<10THEN1300
1240 K=0
1250 FORI=1796TO1956STEP40
1260 FORJ=0TO2:K=K+1
1270 POKEI+J,NU(1,K):POKEI+J+S,2
1280 NEXT:NEXT
1290 TP=H-10:GOTO1310
1300 TP=H
1310 K=0
1320 FORI=1800TO1960STEP40
1330 FORJ=0TO2:K=K+1
1340 POKEI+J,NU(TP,K):POKEI+J+S,2
1350 NEXT:NEXT
1360 IFH>9THENRETURN
1370 FORI=1796TO1956STEP40
1380 FORJ=0TO2:K=K+1
1390 POKEI+J,32:POKEI+J+S,2
1400 NEXT:NEXT
1410 RETURN
1420 :
1430 : CHANGE MINUTE NUMBER
1440 :
1450 T1=T1(M):T2=T2(M)
1460 K=0
1470 FORI=1806TO1966STEP40
1480 FORJ=0TO2:K=K+1
1490 POKEI+J,NU(T1,K):POKEI+J+S,2
1500 NEXT:NEXT
1510 K=0
1520 FORI=1810TO1970STEP40
1530 FORJ=0TO2:K=K+1
1540 POKEI+J,NU(T2,K):POKEI+J+S,2
1550 NEXT:NEXT
1560 RETURN
1570 :
1580 :GET RANDOM TIME
1590 :
1600 G=INT(RND(1)*12)+1:IFG=ATHEN1600
1610 A=G
1620 J=INT(RND(1)*12)+1
1630 IFKK=1THENB=12:RETURN
1640 IFKK=2ANDJ<6THENB=12:RETURN
1650 IFKK=2THENB=6:RETURN
1660 B=J:RETURN
1670 :
1680 :HICKORY
1690 :
1700 POKE53281,0:POKE53280,11:PRINT"[147]"
1710 FORI=0TO24:POKEI+S,0:NEXT
1720 POKES+24,15:POKES+6,240
1730 POKEV,250:POKEV+1,184
1740 POKEV+21,1
1750 PRINT""TAB(30)"[149] "
1760 PRINTTAB(30)" [155] [194] [149] "
1770 PRINTTAB(30)" [155] [221] [149] "
1780 PRINTTAB(30)" [155] [209][192][195][149] "
1790 PRINTTAB(30)" [155] [149] "
1800 PRINTTAB(30)"[149] "
1810 FORI=1TO9
1820 PRINTTAB(30)" [146][158][221] [149] "
1830 NEXT
1840 PRINTTAB(30)" [146][158][209][149] "
1850 PRINTTAB(30)" "
1860 PRINTTAB(30)" "
1870 PRINT""
1880 Z=7:GOSUB1970:PRINT
1890 Z=8:GOSUB1970:PRINT
1900 FORI=186TO50STEP-2:POKEV+1,I:NEXT
1910 Z=4:GOSUB1970:PRINT
1920 POKE1338,160:POKE1257,194:POKE1298,206:POKE1338+S,15:POKE1298+S,15
1930 POKE1339,160:Z=4:GOSUB1970:PRINT
1940 FORI=50TO186STEP2:POKEV+1,I:NEXT
1950 Z=7:GOSUB1970:GOTO250
1960 :
1970 FORI=1TOZ
1980 READA$,A,B,C:POKES+4,17
1990 PRINTA$;:POKES+1,A:POKES,B
2000 FORT=1TOC:NEXT:POKES+4,16
2010 NEXT:RETURN
2020 :
2030 :
2040 DATA "HICK",12,32,125,"O",12,216,125,"RY, ",14,107,125,"DICK",14,107,125
2050 DATA "O",16,47,125,"RY, ",18,42,125,"DOCK!",19,63,1000
2060 DATA "THE ",12,32,125,"MOUSE",12,32,125," ",12,216,125,"RAN ",14,107,125
2070 DATA "UP",14,107,125," ",16,47,125,"THE ",18,42,125,"CLOCK.",19,63,1000
2080 DATA "THE ",14,107,125,"CLOCK ",19,63,250,"STRUCK ",19,63,125
2090 DATA "ONE,",18,42,250,"THE ",18,42,125,"MOUSE ",16,47,250
2100 DATA "RAN ",16,47,125,"DOWN.",14,107,1000
2110 DATA "HICK",14,107,125,"OR",16,47,124,"Y, ",14,107,125,"DICK",12,216,125
2120 DATA "O",12,32,125,"RY, ",10,205,125,"DOCK!",9,159,1000
2130 :
2140 DATA 5,64,84,5,64,84,5,85
2150 DATA 84,0,85,80,0,68,64,0
2160 DATA 85,64,16,81,65,16,21,1
2170 DATA 16,4,1,31,255,253,15,255
2180 DATA 252,0,255,192,0,255,192,0
2190 DATA 255,192,65,170,128,68,162,128
2200 DATA 80,162,128,0,162,128,0,17
2210 DATA 0,0,17,0,1,81,80,255
2220 :
2230 :MUSIC SUBS
2240 :
2250 POKES+5,0:POKES+6,2
2260 POKES+4,129
2270 POKES,100:POKES+1,100
2280 FORT=1TO10:NEXT
2290 POKES+4,128:RETURN
2300 :
2310 POKES+5,0:POKES+6,240
2320 FORI=1TO10
2330 POKES+4,17
2340 POKES,100:POKES+1,20
2350 FORT=1TO50:NEXT
2360 POKES+4,16
2370 NEXT:RETURN
2380 :
2390 POKES+6,240:POKES+5,0
2400 POKES+4,17
2410 POKES,108:POKES+1,6
2420 FORT=1TO300:NEXT
2430 POKES+4,16:RETURN
2440 :
2450 :LEARNING MODULE
2460 :
2470 PRINT"[145][145] "
2480 GOSUB1230:GOSUB1450
2490 K$="":GETK$:IFK$=""THEN2490
2500 IFK$="[135]"THENGOSUB1110:GOSUB1230
2510 IFK$="[136]"THENGOSUB1160:GOSUB1450
2520 IFK$="M"THEN260
2530 GOTO 2490
2540 :
2550 :ML DATA
2560 :
2570 DATA 173,14,220,41,254,141,14,220
2580 DATA 165,1,41,251,133,1,160,0
2590 DATA 185,0,208,153,0,48,185,0
2600 DATA 209,153,0,49,185,0,210,153
2610 DATA 0,50,185,0,211,153,0,51
2620 DATA 185,0,212,153,0,52,185,0
2630 DATA 213,153,0,53,185,0,214,153
2640 DATA 0,54,185,0,215,153,0,55
2650 DATA 200,208,205,165,1,9,4,133
2660 DATA 1,173,14,220,9,1,141,14
2670 DATA 220,96
2680 :
2690 :
2700 :(null) DATA
2710 :
2720 DATA 1,2,4,8,16,32,64,128
2730 DATA 128,64,32,16,8,4,2,1
2740 DATA 0,0,0,0,0,3,28,224
2750 DATA 0,0,1,14,112,128,0,0
2760 DATA 7,56,192,0,0,0,0,0
2770 DATA 192,56,7,0,0,0,0,0
2780 DATA 0,0,128,112,14,1,0,0
2790 DATA 0,0,0,0,0,224,28,3
2800 DATA 8,12,14,255,255,14,12,8
2810 DATA 24,24,24,24,24,126,60,24
2820 DATA 31,15,15,31,57,112,224,192
2830 DATA 192,224,112,57,31,15,15,31
2840 DATA 3,7,14,156,248,240,240,248
2850 DATA 248,240,240,248,156,14,7,3
2860 DATA 0,0,254,62,126,134,2,0
2870 DATA 0,0,127,124,126,97,64,0
2880 DATA 0,0,0,2,134,126,62,254
2890 DATA 0,0,0,64,97,126,124,127
2900 :
2910 :HOUR HAND DATA
2920 :
2930 DATA 3,5,6,5,3,4,3,5,6,5,3,4
2940 DATA 1405,1366,1327
2950 DATA 1405,1406,1407,1368,1369
2960 DATA 1445,1446,1447,1448,1449,1450
2970 DATA 1485,1486,1487,1528,1529
2980 DATA 1485,1526,1567
2990 DATA 1484,1524,1564,1604
3000 DATA 1483,1522,1561
3010 DATA 1483,1482,1481,1520,1519
3020 DATA 1443,1442,1441,1440,1439,1438
3030 DATA 1403,1402,1401,1360,1359
3040 DATA 1403,1362,1321
3050 DATA 1404,1364,1324,1284
3060 DATA 78,78,111
3070 DATA 103,104,105,103,115
3080 DATA 67,67,67,67,67,109
3090 DATA 106,107,108,106,117
3100 DATA 77,77,112
3110 DATA 93,93,93,110
3120 DATA 78,78,113
3130 DATA 105,104,103,105,118
3140 DATA 67,67,67,67,67,31
3150 DATA 108,107,106,108,116
3160 DATA 77,77,114
3170 DATA 93,93,93,30
3180 :
3190 :NUMBER DATA
3200 :
3210 DATA +,+,+,+,-,+,+,-,+,+,-,+,+,+,+
3220 DATA -,+,-,-,+,-,-,+,-,-,+,-,-,+,-
3230 DATA +,+,+,-,-,+,+,+,+,+,-,-,+,+,+
3240 DATA +,+,+,-,-,+,-,+,+,-,-,+,+,+,+
3250 DATA +,-,+,+,-,+,+,+,+,-,-,+,-,-,+
3260 DATA +,+,+,+,-,-,+,+,+,-,-,+,+,+,+
3270 DATA +,+,+,+,-,-,+,+,+,+,-,+,+,+,+
3280 DATA +,+,+,-,-,+,-,-,+,-,-,+,-,-,+
3290 DATA +,+,+,+,-,+,+,+,+,+,-,+,+,+,+
3300 DATA +,+,+,+,-,+,+,+,+,-,-,+,-,-,+
3310 :
3320 :MORE DATA
3330 :
3340 DATA 0,5,1,0,1,5,2,0,2,5,3,0
3350 DATA 3,5,4,0,4,5,5,0,5,5,0,0